﻿<?


	include '../secured/template.php';
	
	$columns = array();
	$columns[] = "pk_persnr";
	$columns[] = "name";
	$columns[] = "gebdatum";
	$columns[] = "passwort";
	$columns[] = "rolle";
	$result = $db->select("Personal", $columns);
	
	echo "<b>INHALT VOM PERSONAL:</b></br>";
	echo "<table border=1><tr><td>Personalnummer:</td><td>Name:</td><td>Passwort:</td><td>Geburtsdatum:</td><td>Rolle:</td></tr>";
	foreach($result as $entry) {
		echo '<tr><td>'.$entry['pk_persnr'].'</td>';
		echo '<td>' . $entry['name'].'</td>';
		echo '<td>' . $entry['passwort'].'</td>';
		echo '<td>' . $entry['gebdatum'].'</td>';
		echo '<td>' . $entry['rolle'].'</td></tr>';
	}
	echo "</table>";
	
		
	$columns = array();
	$columns[] = "pk_nr";
	$columns[] = "name";
	$columns[] = "deadline";
	$columns[] = "budget";
	$result = $db->select("Projekt", $columns);
	
	echo "<p> <b>INHALT VOM PROJEKT:</b></br>";
	echo "<table border=1><tr><td>Projektnummer:</td><td>Projektname:</td><td>Deadline:</td><td>Budget:</td></tr>";
	foreach($result as $entry) {
		echo '<tr><td>' . $entry['pk_nr'].'</td>';
		echo '<td>' . $entry['name'].'</td>';
		echo '<td>' . $entry['deadline'].'</td>';
		echo '<td>' . $entry['budget'].'</td></tr>';
	}
	echo "</table>";
	
	$columns = array();
	$columns[] = "pk_id";
	$columns[] = "von";
	$columns[] = "bis";
	$result = $db->select("Arbeitszeit", $columns);
	
	echo "<p> <b>INHALT VON ARBEITSZEIT:</b></br>";
	echo "<table border=1><tr><td>ID:</td><td>Von:</td><td>Bis:</td></tr>";
	foreach($result as $entry) {
		echo '<tr><td>' . $entry['pk_id'].'</td>';
		echo '<td>' . $entry['von'].'</td>';
		echo '<td>' . $entry['bis'].'</td></tr>';
	}
	echo "</table>";
		
	
	$columns = array();
	$columns[] = "pk_id";
	$columns[] = "fk_personal";
	$columns[] = "fk_arbeitszeit";
	$columns[] = "fk_projekt";
	$result = $db->select("Arbeitet", $columns);
	
	echo "<p> <b>INHALT VON ARBEITET:</b></br>";
	echo "<table border=1><tr><td>ID:</td><td>Personalnummer:</td><td>Arbeitszeit:</td><td>Projektid:</td></tr>";
	foreach($result as $entry) {
		echo '<tr><td>' . $entry['pk_id'].'</td>';
		echo '<td>' . $entry['fk_personal'].'</td>';
		echo '<td>' . $entry['fk_arbeitszeit'].'</td>';
		echo '<td>' . $entry['fk_projekt'].'</td></tr>';
	}
	echo "</table>";
	
		
	$columns = array();
	$columns[] = "pk_id";
	$columns[] = "text";
	$columns[] = "uhrzeit";
	$columns[] = "datum";
	$columns[] = "ort";
	$columns[] = "fk_projekt";
	$result = $db->select("Termin", $columns);
	
	echo "<p> <b>INHALT VOM TERMIN:</b></br>";
	echo "<table border=1><tr><td>TerminID:</td><td>Text:</td><td>Uhrzeit:</td><td>Datum:</td><td>Ort:</td><td>ProjektID:</td></tr>";
	foreach($result as $entry) {
		echo '<tr><td>' . $entry['pk_id'].'</td>';
		echo '<td>' . $entry['text'].'</td>';
		echo '<td>' . $entry['uhrzeit'].'</td>';
		echo '<td>' . $entry['datum'].'</td>';
		echo '<td>' . $entry['ort'].'</td>';
		echo '<td>' . $entry['fk_projekt'].'</td></tr>';
	}
	echo "</table>";